DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Read Method / Read(Byte[],ReadBehaviours) Method

Byte Array to read

The behaviours to be used when reading this stream

Example

In This Topic
    Read(Byte[],ReadBehaviours) Method
    In This Topic
    Reads from a Byte Array
    Syntax
    'Declaration
     
    
    Public Overloads Sub Read( _
       ByVal Array() As System.Byte, _
       Optional ByVal readBehaviours As ReadBehaviours _
    ) 
    public void Read( 
       System.byte[] Array,
       ReadBehaviours readBehaviours
    )

    Parameters

    Array

    Byte Array to read

    readBehaviours

    The behaviours to be used when reading this stream

    Remarks
    Reads an array of byte, which may have been written by Write method.
    Example
    string dicomFile = "your_dicom_image.dcm";
    byte[] dicomBytes = File.ReadAllBytes(dicomFile);
    DicomImage image = new DicomImage();
    image.Read(dicomBytes); // Default call
    image.Read(dicomBytes, new ReadBehaviours() { IgnoreAllPrivateAttributes = true  }); // ReadBehaviours additional option
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also